rods = ['A', 'B', 'C']  

def move(x,y):
    print(f'move from {x} to {y}')
    rods[y].append(rods[x].pop())

